home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_146 / dmemacros / othermacros / .edrc.commented < prev    next >
Text File  |  1992-05-06  |  7KB  |  183 lines

  1. # left and right cursor-keys with line-wraparound
  2.  
  3. map `left'   `ifelse l `if !t `up last'' left'
  4. map `right'  `ifelse r `if !b `down first'' right'
  5.  
  6.  
  7. # shift-(cursor key): up and down one page, left and right one word
  8.  
  9. map `s-up'   `pageup'
  10. map `s-dow'  `pagedown'
  11. map `s-lef'  `wleft'
  12. map `s-rig'  `wright'
  13.  
  14.  
  15. # alt-(cursor key): top and bottom of screen, left and right 40 characters
  16.  
  17. map `a-up'   `screentop'
  18. map `a-dow'  `screenbottom'
  19. map `a-lef'  `repeat 40 left'
  20. map `a-rig'  `repeat 40 right'
  21.  
  22.  
  23. # shift-alt-(cursor key): top and bottom of file, first and last character of line
  24.  
  25. map `sa-up'  `top'
  26. map `sa-dow' `bottom'
  27. map `sa-lef' `first'
  28. map `sa-rig' `last'
  29.  
  30.  
  31. # ctrl-(cursor key): scroll up and down
  32.  
  33. map `c-up'   `scrollup'
  34. map `c-dow'  `scrolldown'
  35.  
  36.  
  37. # In the next four macros, the cursor splits the defined block into two
  38. # sections: the text to the left of the cursor and the text under and to the
  39. # the right of it.  Each macro operates upon one or the other of these sec-
  40. # tions, but only if the cursor is within the defined block when the macro
  41. # is invoked.
  42.  
  43. # delete column under cursor - shift text to right of cursor one column left
  44. map `cs-,' `if cb `goto start while cb `del down' up''
  45. # insert column under cursor - shift text to right of cursor one column right
  46. map `cs-.' `if cb `goto start while cb `` ' left  down' up''
  47.  
  48. # delete column to left of cursor - shift text under and to right of cursor one column left
  49. map `sa-,' `if cb `goto start while cb `bs  if !b right down' left  up''
  50. # insert column to left of cursor - shift text under and to right of cursor one column right
  51. map `sa-.' `if cb `goto start while cb `` ' if !b left  down' right up''
  52.  
  53.  
  54. # allow use of mouse to select, copy and delete blocks of text; separate clipboards are maintained for the left and right mouse-buttons;
  55. # shift-(left-mouse-button click): define start and end of current block; automatically copies block into left clipboard; automatically undefines old block
  56. # ctrl-(left-mouse-button click): goto start of current block
  57. # alt-(left-mouse-button click): goto end of current block
  58. # shift-alt-(left-mouse-button click): copy contents of left clipboard above to the line clicked upon
  59. # ctrl-shift-alt-(left-mouse-button click): delete current block after copying it into left clipboard
  60.  
  61. resettoggle 179
  62. map `sL-lmb'   `if 179 unblock tomouse block ifelse cb `bsave ram:dme.L.clip settoggle 179' `resettoggle 179''
  63. map `cL-lmb'   `goto start'
  64. map `aL-lmb'   `goto end'
  65. map `saL-lmb'  `tomouse insfile ram:dme.L.clip'
  66. map `csaL-lmb' `bsave ram:dme.L.clip bdelete'
  67.  
  68.  
  69. # same as definitions above, except utilize right mouse-button and operate upon the right clipboard
  70.  
  71. map `sR-rmb'   `if 179 unblock tomouse block ifelse cb `bsave ram:dme.R.clip settoggle 179' `resettoggle 179''
  72. map `cR-rmb'   `goto start'
  73. map `aR-rmb'   `goto end'
  74. map `saR-rmb'  `tomouse insfile ram:dme.R.clip'
  75. map `csaR-rmb' `bsave ram:dme.R.clip bdelete'
  76.  
  77.  
  78. # return:    return-with-indent which handles DME bug of adding 2 lines at the end of a file;
  79. # shift-return: return-with-indent-and-text-split which handles DME bug of adding 2 lines at the end of a file;
  80.  
  81. map `return'   `last  ifelse b `split firstnb down down deline' `split firstnb down'  '
  82. map `s-return' `ifelse  b  `split down down deline up firstnb'  `split firstnb'  repeat cleft `first down ` ' up'  firstnb down'
  83.  
  84.  
  85. # del:         TRUE delete, including end-of-line join; handles rich and varied set of bugs with join command
  86. # shift-del:     TRUE word-delete, etc.
  87. # shift-alt-del: line-delete
  88.  
  89. map `del'    `ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'''
  90. map `s-del'  `ifelse ca `resettoggle 0' `settoggle 0' settoggle 3 while 3 `ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'' ifelse 0 `resettoggle 3' `if !ca `resettoggle 3''''
  91. map `sa-del' `deline'
  92.  
  93.  
  94. # bs:        TRUE backspace, including end-of-line join; handles rich and varied set of bugs with join command
  95. # shift-bs:    TRUE word-backspace, etc.
  96. # shift-alt-bs: line-delete
  97.  
  98. map `bs'     `ifelse l `ifelse t up `up last'' left ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc'''
  99. map `s-bs'   `settoggle 3 while 3 `ifelse l `ifelse t up `up last'' left ifelse l `resettoggle 3' `left if !ca `resettoggle 3' right' if !ca `resettoggle 3' ifelse !r del `ifelse l `if !b deline' `resettoggle 1 resettoggle 2 source ram:join.edrc''''
  100. map `sa-bs'  `deline'
  101.  
  102.  
  103. # prompt: replace current file with new one; prompt: open new window with new file
  104.  
  105. map `f1'     `escimm `newfile ''
  106. map `s-f1'   `escimm `newwindow newfile ''
  107.  
  108.  
  109. # prompt: insert file before current line; prompt: change name of current file
  110.  
  111. map `f2'     `escimm `insfile ''
  112. map `s-f2'   `escimm `chfilename ''
  113.  
  114.  
  115. #prompt: save file as ?; save current file
  116.  
  117. map `f3'     `escimm `saveas ''
  118. map `s-f3'   `saveold'
  119.  
  120.  
  121. #safe quit; save current file then quit
  122.  
  123. map `f4'     `quit'
  124. map `s-f4'   `saveold quit'
  125.  
  126.  
  127. #execute the right and left clipboards as macros
  128.  
  129. map `f5'     `source dme.R.clip   unblock'
  130. map `s-f5'   `source dme.L.clip   unblock''
  131.  
  132.  
  133. # open small windows to view contents of the left and right clipboards
  134.  
  135. map `f6'     `topedge 12 height 45 newwindow newfile dme.R.clip topedge 1 height 360'
  136. map `s-f6'   `topedge 58 height 45 newwindow newfile dme.L.clip topedge 1 height 360'
  137.  
  138. # find previous occurrence of find-string
  139. # find/replace previous occurrence of find-string; differs from prevr in that it will change word under the cursor (allowing you to selectively find-and-replace with a minimum of keystrokes)
  140. # prompt: find/replace all previous occurrences of find-string
  141.  
  142. map `f7'     `prev'
  143. map `s-f7'   `ifelse r `if !b `down first'' `right' prevr'
  144. map `sa-f7'  `escimm `ifelse r  `if !b `down first'' `right'  prevr  repeat -1 prevr''
  145.  
  146.  
  147. # find next occurrence of find-string
  148. # find/replace next occurrence of find-string; differs from findr in that it will change word under the cursor (allowing you to selectively find-and-replace with a minimum of keystrokes)
  149. # prompt: find/replace all subsequent occurrences of find-string
  150.  
  151. map `f8'     `next'
  152. map `s-f8'   `ifelse l `if !t `up last'' `left' nextr'
  153. map `sa-f8'  `escimm `ifelse l  `if !t `up last'' `left'  nextr  repeat -1 nextr''
  154.  
  155.  
  156. # prompt: define find-string and search for previous occurrence of it
  157. # prompt: define find-string and replace-string and search for previous occurrence of find-string
  158.  
  159. map `f9'     (escimm (findstr `) prev)
  160. map `s-f9'   (escimm (findstr `) escimm (repstr `) prev)
  161.  
  162.  
  163. # prompt: define find-string and search for next occurrence of it
  164. # prompt: define find-string and replace-string and search for next occurrence of find-string
  165.  
  166. map `f10'    (escimm (findstr `) next)
  167. map `s-f10'  (escimm (findstr `) escimm (repstr `) next)
  168.  
  169.  
  170. # miscellaneous
  171.  
  172. map `c-g'    `escimm `goto ''
  173. map `c-k'    `remeol'
  174. map `tab'    `tab'
  175. map `s-tab'  `backtab'
  176. map `help'   `recall'
  177.  
  178.  
  179. insertmode on
  180. savetabs on
  181. tabstop 3
  182. pageset 96
  183.